/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.pe.siass.form;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author Hrengifo
 */
public class FLoginUser extends ActionForm{

    private String strLogin;
    private String strPassword;
    private String strCaptcha;
    private String strMedoto;

    public FLoginUser(){
        super();
    }

    public String getStrCaptcha() {
        return strCaptcha;
    }

    public void setStrCaptcha(String strCaptcha) {
        this.strCaptcha = strCaptcha;
    }

    public String getStrLogin() {
        return strLogin;
    }

    public void setStrLogin(String strLogin) {
        this.strLogin = strLogin;
    }

    public String getStrPassword() {
        return strPassword;
    }

    public void setStrPassword(String strPassword) {
        this.strPassword = strPassword;
    }

    public String getStrMedoto() {
        return strMedoto;
    }

    public void setStrMedoto(String strMedoto) {
        this.strMedoto = strMedoto;
    }

    @Override
    public ActionErrors validate(ActionMapping mappin, HttpServletRequest request){
        ActionErrors errors = new ActionErrors();
        if(getStrLogin() == null || getStrLogin().length()<1){
            errors.add("login", new ActionMessage("errors.login.invalid"));
        }
        return errors;
    }


}
